-- GENERATED SPELL FOR [Sorcerous Shade] --


function spell0_16526(pUnit, Event) --@Fireball Volley,Self--
pUnit:FullCastSpellOnTarget(29922,pUnit)
pUnit:RegisterEvent('Sorts_16526', 5000, 1)
end

function spell1_16526(pUnit, Event) --@Frostbolt Volley,Self--
pUnit:FullCastSpellOnTarget(29923,pUnit)
pUnit:RegisterEvent('Sorts_16526', 6000, 1)
end

function spell2_16526(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(29924,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16526', 2000, 1)
end

function Sorts_16526(pUnit, Event)
local choix_sorts_16526 = math.random(0, 2)
if choix_sorts_16526 == 0 then
pUnit:RegisterEvent('spell0_16526', 1, 1)
end
if choix_sorts_16526 == 1 then
pUnit:RegisterEvent('spell1_16526', 1, 1)
end
if choix_sorts_16526 == 2 then
pUnit:RegisterEvent('spell2_16526', 1, 1)
end
end

function mob16526_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16526', math.random(1500, 3000), 1)
end

function mob16526_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16526_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16526_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16526, 1, 'mob16526_Action')
RegisterUnitEvent(16526, 2, 'mob16526_Leave')
RegisterUnitEvent(16526, 3, 'mob16526_Kill')
RegisterUnitEvent(16526, 4, 'mob16526_Die')
